﻿using System;
using Processing001.Library.Interfaces;

namespace Processing001.Library
{
    public class GenerationFunction : GenerationFunctionAbstract<ComplexNumber>
    {
        public GenerationFunction(int N)
        {
            this.N = N;
        }

        public override ComplexNumber Execute(int iterator)
        {
            return new ComplexNumber(Math.Cos((Math.PI * 2 / N) * iterator) + Math.Sin((Math.PI * 2 / N) * iterator), 0);
        }
    }
}
